﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace EFCore.Models;

[Table("BoxGrid")]
public partial class BoxGrid
{
    [Key]
    [Column("Id_BoxGrid")]
    public Guid IdBoxGrid { get; set; }

    /// <summary>
    /// 格口序号
    /// </summary>
    public int Sequence { get; set; }

    /// <summary>
    /// 格口号
    /// </summary>
    public string BoxGridCode { get; set; } = null!;

    /// <summary>
    /// 储位数
    /// </summary>
    public int BoxPositionQuantity { get; set; }

    [Column("TheBoxId_Box")]
    public Guid TheBoxIdBox { get; set; }

    [InverseProperty("IdBoxGr")]
    public virtual ICollection<MaterialBase> MaterialBases { get; set; } = new List<MaterialBase>();

    [ForeignKey("TheBoxIdBox")]
    [InverseProperty("BoxGrids")]
    public virtual Box TheBoxIdBoxNavigation { get; set; } = null!;
}
